/*
 *                  BioJava development code
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  If you do not have a copy,
 * see:
 *
 *      http://www.gnu.org/copyleft/lesser.html
 *
 * Copyright for this code is held jointly by the individual
 * authors.  These should be listed in @author doc comments.
 *
 * For more information on the BioJava project and its aims,
 * or to join the biojava-l mailing list, visit the home page
 * at:
 *
 *      http://www.biojava.org/
 * 
 * Created on May 23, 2005
 *
 */
package org.biojava.services.das.servlets;

import java.io.IOException;

import javax.servlet.GenericServlet;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import org.quartz.JobExecutionException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import uk.ac.sanger.dasregistry.timer.AutoValidation;


/**Just a servlet to test the autovalidation by requesting a web page. All chron jobs type work is now done bythe AutoValidation class and quartz.
 * 
 * @author Jonathan Warren
 *
 */
public class AutoValidator extends GenericServlet{

	public void service(ServletRequest request,
			ServletResponse response)
	throws IOException, ServletException
	{

	BeanFactory ctx=(new ClassPathXmlApplicationContext("SpringDAO.xml"));
	AutoValidation auto=(AutoValidation) ctx.getBean("autoValidation");
	auto.runAutoValidation(true);
	

	}

}
